120 DIM X$(500),FOUND$(500) ' REMEMBER TO CHANGE LINE # 360 ALSO.
130 SCREEN 0,0,0,0
140 COLOR 7,0,0
150 WIDTH 80
160 CLS
170 SP$=STRING$(15," ")
180 KEY OFF
190 RANDOMIZE (VAL(RIGHT$(TIME$,2))*555)
200 GOTO 280
210 LOCATE 25,60
220 PRINT"PRESS ";
230 COLOR 18
240 PRINT"<ENTER>";
250 COLOR 7
260 PHIL$=INKEY$
270 IF PHIL$="" THEN 260 ELSE RETURN
280 '*********************** G E O G R A P H Y *******************************
290 ' the aprostophy (') and REM mean the same thing - remark.
300 DEFINT A-Z
310 CLS
320 KEY OFF
330 GOSUB 1670
340 ON ERROR GOTO 2880
350 '
360 FINIS=500
370 FOR I=1 TO FINIS
380 READ X$(I)
390 NEXT I
400 FINIS=I
410 PRINT
420 PRINT"I know of"FINIS"locations.";
430 PRINT" Press ";
440 COLOR 18
450 PRINT"<ENTER>";
460 COLOR 7
470 PRINT"."
480 IN$=INKEY$
490 IF IN$<>CHR$(13) THEN 480
500 CLS
510 BEEP
520 INPUT "Make your initial selection: ",IN$
530 IF IN$="" THEN LOCATE CSRLIN-1:GOTO 510
540 IF ASC(LEFT$(IN$,1))>90 THEN PRINT"Enter in upper case only. Press the <CAPS LOCK> button once.":PRINT,"(to the right of the spacebar)":GOSUB 210:CLS:GOTO 510
550 FOR I=1 TO FINIS
560 IF IN$=X$(I) THEN PRINT TAB(30):LOCATE CSRLIN-1:PRINT "-Ok, good. "IN$" is a match.":GOSUB 1260:GOTO 1010
690 IF IN$="CHALLENGE" OR IN$="CHALLANGE" THEN 1370
700 IF IN$="QUIT" OR IN$="END" THEN 1950
710 IF IN$="STOP" THEN PRINT"You entered STOP. To resume, press 'R'. Any other key will end this game." ELSE 750
720 PHIL$=INKEY$
730 IF PHIL$="" THEN 720
740 IF PHIL$="R" THEN 610 ELSE 1950
750 IF LEN(IN$)<2 THEN LOCATE CSRLIN-1:GOTO 610
760 IF ASC(LEFT$(IN$,1))>90 THEN PRINT"Enter in upper case only. Press the <CAPS LOCK> button once.":GOSUB 2070:GOTO 610
770 IF IN$="" THEN LOCATE CSRLIN-1:GOTO 610
780 PRINT TAB(LEN(IN$)+14);
790 LOCATE CSRLIN-1
800 COLOR 18
810 PRINT"searching";
820 COLOR 7
830 PRINT
840 IF LEFT$(IN$,1)<>RIGHT$(FOUND$(FOUND),1) THEN PRINT TAB(14+LEN(IN$));:LOCATE CSRLIN-1:PRINT"*";:COLOR 18:PRINT"*";:COLOR 7:PRINT"* Your first letter doesn't match my last one.":GOSUB 2070:GOTO 610
850 GOSUB 1180
860 IF USED=1 THEN 610
870 I=1
880 WHILE I<FINIS
890 IF IN$=X$(I) THEN GOSUB 1000:GOSUB 1260:GOTO 1010
900 I=I+1
910 WEND
920 LOCATE CSRLIN-1,14+LEN(IN$)
930 PRINT"*";
940 COLOR 18
950 PRINT"*";
960 COLOR 7
970 PRINT"* "IN$" not found"
980 GOSUB 2070
990 GOTO 610
1000 IF IN$=X$(I) THEN PRINT TAB(13):LOCATE CSRLIN-1:SOUND 1200,2:COLOR 0,7:PRINT" ";IN$;" ";:COLOR 7,0:PRINT" IS A MATCH.":RETURN '***inform user that input value was valid
1060 IF LEFT$(X$(I),1)=RIGHT$(IN$,1) THEN GOSUB 1260:GOTO 1160
1070 NEXT I
1080 FOR I=START TO 1 STEP -1
1090 IF LEFT$(X$(I),1)=RIGHT$(IN$,1) THEN GOSUB 1260:GOTO 1160
1100 NEXT I
1110 PRINT
1120 PRINT"*** I can't find any more locations starting with ";RIGHT$(FOUND$(FOUND),1);"."
1130 PRINT
1140 PRINT"You did a good job. You win........this time."
1150 GOTO 1950
1160 PRINT"I selected: "FOUND$(FOUND)
1170 GOTO 610
1180 '
1190 '
1200 '******************** Locate in found list ******************************
1210 USED=0
1220 FOR J=1 TO FOUND
1230 IF IN$=FOUND$(J) THEN PRINT TAB(14+LEN(IN$));:LOCATE CSRLIN-1:PRINT"*";:COLOR 18:PRINT"*";:COLOR 7:PRINT"* Is already used!":GOSUB 2070:USED=1:GOTO 1250
1240 NEXT J
1250 RETURN
1260 '
1270 '
1280 '******** decrement the supply list & increment the FOUND list by one *****
1420 IF LEFT$(X$(J),1)=RIGHT$(FOUND$(FOUND),1) THEN PRINT:COLOR 0,7:PRINT " ";X$(J);" ";:COLOR 7,0:PRINT" remained to be selected! You lose!":GOSUB 2070:GOTO 1470
1430 J=J+1
1440 WEND
1450 PRINT
1460 PRINT"You won! I can't find another selection to match you."